# -*- coding: utf-8 -*-
"""
Created on Wed Oct  9 22:35:02 2019

@author: XCL01
"""

import numpy as np
l = [
     [10, 34, 54, 23, 2],
     [31, 87, 53, 68, 3],
     [98, 49, 25, 11, 4],
     [84, 32, 67, 88, 5]
     ]
for i in range(len(l)):
    l[i].insert(0, 0)
    l[i].append(0)
a = np.zeros([1, len(l[0])], dtype = np.int)#构造全零数组(zero前参行, 后参列), 后接数据类型
b = np.row_stack((a, l))#数组做行合并(a/l)
b = np.row_stack((b, a))
print(b)